/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.raitcon.hibernate.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;


/**
 *
 * @author Mike
 */
/**
 * Alumno generated by hbm2java
 */
@Entity
@Table(name="matricula"
    ,schema="public"
)
public class Matricula implements java.io.Serializable  {
    
  
  private Integer idMatricula;
  private Alumno alumno;
  private GradoSeccion gradoSeccion;
  private Anio anio ;
  private String situacion;
  private String state;
 
   
  
   public Matricula() {
    }
    /**
     * @return the idMatricula
     */
   @Id
    @SequenceGenerator(allocationSize=1, initialValue=1, sequenceName="secuencia_id_matricula", name="secuencia_id_matricula")
    @GeneratedValue(generator="secuencia_id_matricula", strategy=GenerationType.SEQUENCE)  
   @Column(name="id_matricula", unique=true, nullable=false)
    public Integer getIdMatricula() {
        return idMatricula;
    }

    /**
     * @param idMatricula the idMatricula to set
     */
    public void setIdMatricula(Integer idMatricula) {
        this.idMatricula = idMatricula;
    }

    /**
     * @return the alumno
     */
    @ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="id_alumno", nullable=false)
    public Alumno getAlumno() {
        return alumno;
    }
    
    
    /**
     * @param alumno the alumno to set
     */
    public void setAlumno(Alumno alumno) {
        this.alumno = alumno;
    }

   
    /**
     * @return the situacion
     */
    @Column(name="situacion", nullable=false, length=50)
    public String getSituacion() {
        return situacion;
    }

    /**
     * @param situacion the situacion to set
     */
    public void setSituacion(String situacion) {
        this.situacion = situacion;
    }

    /**
     * @return the state
     */
     @Column(name="state", nullable=false, length=1)
    public String getState() {
        return state;
    }

    /**
     * @param state the state to set
     */
    public void setState(String state) {
        this.state = state;
    }

    /**
     * @return the gradoSeccion
     */
    @ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="id_grado_seccion", nullable=false)
    public GradoSeccion getGradoSeccion() {
        return gradoSeccion;
    }

    /**
     * @param gradoSeccion the gradoSeccion to set
     */
    public void setGradoSeccion(GradoSeccion gradoSeccion) {
        this.gradoSeccion = gradoSeccion;
    }

    /**
     * @return the anio
     */
    @ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="id_anio", nullable=false)
    public Anio getAnio() {
        return anio;
    }

    /**
     * @param anio the anio to set
     */
    public void setAnio(Anio anio) {
        this.anio = anio;
    }

     
}
